package cn.dm.common;

import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class LogUtils {
    @Resource
    private KafkaTemplate<String,String> kafkaTemplate;

    public void sendLogToKafka(String topic,String logMessage){
        kafkaTemplate.send(topic,"dm",logMessage);
    }

}
